package game.model.converter;

import common.model.po.GMilestone;
import game.model.request.SaveMilestoneRequest;

/**
 * 描述
 *
 * @author 米泽鹏
 * @since 2024-1-20 上午 2:03
 */
public class GMilestoneConverter {

	public static GMilestone saveRequestToPo(SaveMilestoneRequest saveMilestoneRequest) {
		if (saveMilestoneRequest == null) {
			return null;
		}
		GMilestone gMilestone = new GMilestone();
		gMilestone.setName(saveMilestoneRequest.getName());
		gMilestone.setLevel(saveMilestoneRequest.getLevel());
		gMilestone.setDuration(saveMilestoneRequest.getDuration());
		gMilestone.setPreconditionId(saveMilestoneRequest.getPreconditionId());
		gMilestone.setImage(saveMilestoneRequest.getImage());
		gMilestone.setSort(saveMilestoneRequest.getSort());
		gMilestone.setId(saveMilestoneRequest.getId());
		return gMilestone;
	}

}
